<script lang="ts">
export default {
    name: "Brand",
    mounted() {
        this.$store.dispatch('product/getBrandListAsync');
    }
}
</script>

<template>
    <div class="brand">
        <div class="py-container">
            <ul class="brand-list">
                <li v-for="item in $store.state.product.brandList" :key="item._id" class="brand-item">
                    <img :src="'/img'+item.img" />
                </li>
            </ul>
        </div>
    </div>
</template>

<style scoped lang="less">
.brand {
    margin: 10px 0;

    .py-container {
        width: 1200px;
        margin: 0 auto;

        .brand-list {
            overflow: hidden;
            padding: 15px 0;
            background: #f7f7f7;
            line-height: 18px;

            .brand-item {
                width: 120px;
                float: left;
                height: 37px;

                img {
                    border-left: 1px dotted #ccc;
                    padding: 0 10px;
                }

                &:first-child {
                    img {
                        border-left: 0;
                    }
                }
            }
        }
    }
}
</style>
